/**
 * 商品列表服务
 */
angular.module('homes.service', [])
  .factory('HomeFty', function ($q) {
    return {
      // 1.刷新商品列表
      getShopCategory: function () {
        var ShopCategory = [
           {
            name: "源之港",
            src: "img/home/tea.jpg",
            typeNumber: '1001',
            score: "4.5",
            sell: "200+",
            per: "￥15",
            operation: "天天神券"
          },
          {
            name: "四季物语",
            src: "img/home/tea8.jpg",
            typeNumber: '1002',
            score: "4.5",
            sell: "200+",
            per: "￥15",
            operation: "天天神券"
          },
          {
            name: "有喜",
            src: "img/home/tea2.jpg",
            typeNumber: '1003',
            score: "4.5",
            sell: "200+",
            per: "￥15",
            operation: "天天神券"
          },
          {
            name: "抹茶奶盖",
            src: "img/home/tea3.jpg",
            typeNumber: '1004',
            score: "4.5",
            sell: "200+",
            per: "￥15",
            operation: "天天神券"
          },
          {
            name: "珍珠奶茶",
            src: "img/home/tea4.jpg",
            typeNumber: '1005',
            score: "4.5",
            sell: "200+",
            per: "￥15",
            operation: "天天神券"
          },
          {
            name: "糖玛奇朵",
            src: "img/home/tea5.jpg",
            typeNumber: '1006',
            score: "4.5",
            sell: "200+",
            per: "￥23",
            operation: "天天神券"
          },
          {
            name: "柠檬茶",
            src: "img/home/tea6.jpg",
            typeNumber: '1007',
            score: "4.5",
            sell: "200+",
            per: "￥15",
            operation: "天天神券"
          },
          {
            name: "青心乌龙",
            src: "img/home/tea7.jpg",
            typeNumber: '10201',
            score: "4.5",
            sell: "200+",
            per: "￥15",
            operation: "天天神券"
          },
        ];
        // 假设数据请求成功
        var deferred = $q.defer();
        deferred.resolve(ShopCategory);
        // console.log(ShopCategory);
        return deferred.promise;

      }

    }
  });